﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KOPLibrary.SharePointManagement
{
    public class HistoryData
    {
        public string DateOccured { get; set; }
        public string EventType { get; set; }
        public string UserId { get; set; }
        public string Description { get; set; }
        public string Outcome { get; set; }

        public HistoryData(string dateOccured, string eventType, string userId, string description, string outcome)
        {
            DateOccured = dateOccured;
            EventType = eventType;
            UserId = userId;
            Description = description;
            Outcome = outcome;
        }

        public HistoryData(string[] items)
        {

            try
            {
                DateOccured = items[0];
            }
            catch { DateOccured = string.Empty; }

            try
            {
                EventType = items[1];
            }
            catch { EventType = string.Empty; }

            try
            {
                UserId = items[2];
            }
            catch { UserId = string.Empty; }

            try
            {
                Description = items[3];
            }
            catch { Description = string.Empty; }

            try
            {
                Outcome = items[4];
            }
            catch { Outcome = string.Empty; }
        }
    }
}
